/**
 * File    : PropertyManager.java
 * Created : 2008-10-9
 * By      : LuHuiguo
 */
package com.luhuiguo.sso.service;

import java.util.List;

import com.luhuiguo.sso.entity.Property;

/**
 * @author LuHuiguo
 * @version $Id: PropertyManager.java 19 2008-10-18 15:59:28Z LuHuiguo $
 * 
 */
public interface PropertyManager {

	Property getProperty(Long id);

	Property getProperty(String name);

	boolean existsProperty(String name);

	List<Property> getAllProperty(int... rowStartIdxAndCount);

	void createProperty(Property property);

	void updateProperty(Property property);

	void deleteProperty(Long id);

	void deleteProperty(String name);

	void deleteProperty(Property property);

	void setProperty(String name, String value);

	void setProperty(String name, boolean value);

	void setProperty(String name, int value);

	void setProperty(String name, double value);

	boolean getBoolean(String name);

	boolean getBoolean(String name, boolean defaultValue);

	double getDouble(String name);

	double getDouble(String name, double defaultValue);

	int getInt(String name);

	int getInt(String name, int defaultValue);

	String getString(String name);

	String getString(String name, String defaultValue);

	void setEnableCheckImmediateMode(boolean enableCheckImmediateMode);

	String getBaseURL();

	void setBaseURL(String baseURL);

	boolean isEnableCheckImmediateMode();

	void setEnableStatelessMode(boolean enableStatelessMode);

	boolean isEnableStatelessMode();

	void setEnableRelyingPartyLocalhostMode(
			boolean enableRelyingPartyLocalhostMode);

	boolean isEnableRelyingPartyLocalhostMode();

	boolean isEnableCaptchaOnLogin();

	void setEnableCaptchaOnLogin(boolean enableCaptchaOnLogin);

	boolean isEnableCaptchaOnRegistration();

	void setEnableCaptchaOnRegistration(boolean enableCaptchaOnRegistration);

	boolean isEnableEmailConfirmationOnRegistration();

	void setEnableEmailConfirmationOnRegistration(
			boolean enableEmailConfirmationOnRegistration);

}
